package com.ruoyi.wms.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
import com.ruoyi.common.excel.convert.ExcelDictConvert;
import com.ruoyi.wms.domain.entity.stock.PurchaseRequests;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 采购申请视图对象 wms_purchase_requests
 *
 * @author zcc
 * @date 2024-11-20
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = PurchaseRequests.class)
public class PurchaseRequestsVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    private Long id;
    /**
     * 单号
     */
    @ExcelProperty(value = "单号")
    private String requestNumber;

    /**
     * 仓库ID
     */
    @ExcelProperty(value = "仓库ID")
    private Long warehouseId;

    /**
     * 库区id
     */
    @ExcelProperty(value = "库区id")
    private Long areaId;

    /**
     * 采购人ID
     */
    @ExcelProperty(value = "采购人ID")
    private Long requesterId;

    /**
     * 供货商ID
     */
    @ExcelProperty(value = "供货商ID")
    private Long merchantId;

    /**
     * 申请时间
     */
    @ExcelProperty(value = "申请时间")
    private Date requestDate;

    /**
     * 预期交货时间
     */
    @ExcelProperty(value = "预期交货时间")
    private Date expectedDeliveryDate;

    /**
     * 采购状态
     */
    @ExcelProperty(value = "采购状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "wms_purchase_status")
    private Integer purchaseStatus;

    /**
     * 订单金额
     */
    @ExcelProperty(value = "订单金额")
    private BigDecimal payableAmount;

    /**
     * 商品总数
     */
    @ExcelProperty(value = "商品总数")
    private BigDecimal totalQuantity;

    /**
     * 修改时间
     */
    @ExcelProperty(value = "修改时间")
    private Date updateTime;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 采购申请详情
     */
    private List<PurchaseRequestDetailsVo> details;


}
